#include <stdio.h>

int main() {
    int a, b, c, a1, b1, c1;
    while (scanf("%d %d %d\n%d %d %d", &a, &b, &c, &a1, &b1, &c1) != EOF)
    {
        if (a1 > a)
            printf("yes");
    }
    if (a1 < a)
        printf("no");
    if (a1 == a)
    {
        if (b1 > b)
        {
            printf("yes");
        }
        else if (b1 == b)
        {
            if (c1 >= c)
                printf("yes");
            else
                printf("no");
        }
        else {
            printf("no");
        }
    }
    return 0;
}